package pages;

import org.openqa.selenium.By;
import org.openqa.selenium.WebDriver;
import util.PropertyLoader;

/**
 * Created by 1 on 05.04.2014.
 */
public class ComputersNotebooksPage extends BasePage
{
    private static final String URL_HOME_PAGE = PropertyLoader.loadProperty("site.url");
    private static final String URL_COMP_NOTES_PAGE =("http://rozetka.com.ua/computers-notebooks/c80253/");
    private static final By COMP_NOTE_MENU_LINK = By.xpath("//*[@id=\"computers-notebooks\"]/div/a");

    public ComputersNotebooksPage(WebDriver driver) {
        super(driver);
    }


    public void openComputersNotesPage()
    {
        driver.get(URL_HOME_PAGE);
        driver.findElement(COMP_NOTE_MENU_LINK).click();
    }
    public boolean computersNotesPageIsOpened()
    {
        return driver.getCurrentUrl().equals(URL_COMP_NOTES_PAGE);
    }
}
